package myUtil;

public class personCheck {
    public static boolean checkNumber(String worknumber) {
        if (worknumber == null) {
            return false;
        }
        String pattern = "[0-9]{8}";
        if (pattern == null) {
            return false;
        }
        if (!worknumber.matches(pattern)) {
            return false;
        }
        else { return true;}
    }

    public static boolean checkS(String s) {
        if (s == "") {
           return false;
        }
        else {
            return true;
        }
    }

    public static boolean checkPhonenumber(String phonenumber) {
        if (phonenumber == null) {
            return false;
        }
        String pattern = "1\\d{10}";
        if (!phonenumber.matches(pattern)){
            return false;
        }else {
            return true;
        }
    }
}
